package de.unibi.mmi.homeauto.team1.devices;

import de.unibi.mmi.homeauto.team1.R;
import de.unibi.mmi.homeauto.team1.constants.Constants;
import de.unibi.mmi.homeauto.team1.drafts.DraftFragment;
import de.unibi.mmi.homeauto.team1.drafts.DraftViewPager;
import de.unibi.mmi.homeauto.team1.mainview.MainViewActivity;

public class DeviceViewPager extends DraftViewPager {

	public static final int FIRE_POS = 0;
	public static final int LAMP_POS = 1;
	public static final int WINDOW_POS = 2;
	public static final int DOOR_POS = 3;
	public static final int ROOM_TEMP = 4;
	public static final int OVEN_POS = 5;
	public static final int TUB_POS = 6;

	public static final int TELEPHONE_POS = 7;
	public static final int BELL_POS = 8;
	public static final int COOKER_POS = 9;

	public DeviceViewPager(MainViewActivity mpv) {

		startItem = 0;

		fragments = new DraftFragment[7];
		fragments[FIRE_POS] = new FireFragment();
		fragments[LAMP_POS] = new LampFragment();
		fragments[WINDOW_POS] = new WindowFragment();
		fragments[DOOR_POS] = new DoorFragment();
		fragments[ROOM_TEMP] = new TempFragment();
		fragments[OVEN_POS] = new OvenFragment();
		fragments[TUB_POS] = new TubFragment();

		init(mpv, R.layout.pager3, R.id.pager3, R.id.indicatortitle3,
				R.id.indicatorbottom3);
	}

	@Override
	public final boolean onBackKey() {
		mva.changeScreen(MainViewActivity.MAIN_POS, Constants.NOT_SET);
		return true;
	}

}
